package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.ITypeDao;
import com.adderis.soft.domain.model.Type;
import com.adderis.soft.service.ITypeBo;

@Service("typeService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class TypeServiceImpl implements ITypeBo {


	@Autowired
	private ITypeDao typeDao;

	@Transactional(readOnly = false)
	public void persist(Type transientType) {
		typeDao.persist(transientType);

	}

	@Transactional(readOnly = false)
	public void remove(Type persistentType) {
		typeDao.remove(persistentType);

	}

	@Transactional(readOnly = false)
	public Type merge(Type detachedType) {

		return typeDao.merge(detachedType);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		typeDao.remove(id);

	}

	public Type findById(Integer id) {
		return typeDao.findById(id);
	}

	public List<Type> findAll() {
		return typeDao.findAll();
	}

	public List<Type> search(String searchString) {
		return typeDao.search(searchString);
	}

	

}
